package com.starwish.starwishblog.mapper;

import com.starwish.starwishblog.entity.Category;
import com.starwish.starwishblog.vo.CategoryVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface CategoryMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Category record);

    Category selectByPrimaryKey(Integer id);

    List<CategoryVo> selectAll();

    int updateByPrimaryKey(Category record);

    List<CategoryVo> selectCateByCons(String name);

    void deleteById(@Param("id") Integer id );

    int hotById(@Param("id") Integer id,@Param("status") Integer status);

    List<CategoryVo> selectByBoardId(@Param("bid") Integer bid);
}